package com.yiyahui.framework.config;

import com.yiyahui.common.utils.STSUtils;
import com.yiyahui.framework.config.properties.AliSTSPropertis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 程序注解配置
 *
 * @author ruoyi
 */
@Configuration
@EnableConfigurationProperties(AliSTSPropertis.class)
public class AliyunSTSConfig
{
    @Autowired
    AliSTSPropertis stsPropertis;

    /**
     * oss组件
     * @return AliyunOSSUtil
     */
    @Bean
    public STSUtils aliyunSTSUtil(){
        STSUtils STSUtil = new STSUtils();
        STSUtil.setSTSPropertis(stsPropertis);
        return STSUtil;
    }
}
